import Request from '@/libs/request'
import qs from 'qs'

/**WEB 查看设备 分享详情 */
export const uSelectMyDevShareDetailed = (data: {userId: string}) =>
  Request.get<DeviceShare.ShareDetail[]>('/user/uSelectMyDevShareDetailed', data)

/**分享设备给其他用户 */
export const uShareMyDev = (data: {devId: number; shareUserPhone: number}) =>
  Request.get<null>('/user/uShareMyDev', data)

/**查看该设备分享的用户 用于取消分享 */
export const uSelectDevShareUser = (data: {devId: number; userId: string}) =>
  Request.get<DeviceShare.DevShareUser>('/user/uSelectDevShareUser', data)

/**取消分享 */
export const uCancelShareDev = (data: {userDevId: number}) =>
  Request.get<null>('/user/uCancelShareDev', data)
